#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define flag '#'

void progressBar1()
{
    char buff[101];
    memset(buff,0,101);
    static char s[] = "/-|\\";
    int cnt = 0;
    static int tmp = 0;
    while(cnt<=100)
    {
        tmp %= 4;
        printf("[%-100s][%d%%][%c]\r",buff,cnt,s[tmp]);
        fflush(stdout);
        usleep(10000);
        ++tmp;
        buff[cnt] = flag;
        ++cnt;
    }
    printf("\n");
}
